<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:p="http://primefaces.org/ui">


<h:head>
        <title>Aggiungi Nuovo Pacchetto</title>
</h:head>
<h:body>
	<ui:composition template="template.xhtml">
		
		<ui:define name="content">
	
        
		<h:form>
		
			<p:panel header="Show Gift">
					<h:panelGrid columns="" id="regGrid">
						
		                
		            	<h:outputText  /> <h:outputText  /><h:outputText  />
		           		           		
		           		<p:dataTable id="pacchetti"  var="esc" value="#{showGifBean.pacchetticonv}" update="regGrid" rowKey="#{esc.id}" selection="#{showGifBean.selectPack}" selectionMode="single">
		                                        <p:column headerText="id">  #{esc.id}  </p:column>
		                                        <p:column headerText="Luogo">  #{esc.luogo}  </p:column>
		
		                                        <p:column headerText="Mezzo Andata">  #{esc.voloAndata}  </p:column>
		
		                                        <p:column headerText="Mezzo Ritorno">  #{esc.voloRitorno}  </p:column>
		
		                                        <p:column headerText="Albergo">  #{esc.albergo}  </p:column>
		
		                                        
		                </p:dataTable>
		                <h:outputText  />
		                 <p:commandButton value="Escursioni" icon="ui-icon-search" update="escu"   actionListener="#{showGifBean.showEscursioniPacc()}"  />  
		               
		                <h:outputText value="Escursioni associate al pacchetto selezionato" /> <h:outputText  /> <h:outputText  /> 
		                 <p:dataTable id="escu"  var="selectedEsc" value="#{showGifBean.escLis}" update="regGrid" rowKey="#{selectedEsc.id}" >
		                                        <p:column headerText="id">  #{selectedEsc.id}  </p:column>
		                                        <p:column headerText="Descrizione">  #{selectedEsc.infoEsc}  </p:column>
												<f:facet name="footer">
		                                           
		                                             
		                                        </f:facet>
		                </p:dataTable>
						 <p:commandButton value="Prosegui" icon="ui-icon-search" update="escu"   action="#{showGifBean.procedi()}"  />  
						
				</h:panelGrid>
				</p:panel>	
		
			</h:form>
		</ui:define>
			
	</ui:composition>
</h:body>
</html>